#include "StdAfx.h"
#include "server.hpp"
#include <handler\rtt_handler.h>
#include <handler\user_handler.h>
#include <handler\move_handler.h>

using namespace fly::jld::server;

TEST(srv, start)
{
	try
	{

		LOG_INFO("Initialize the handlers");
		handler* hnd = (new user_handler())->init_branch();
		hnd->set_next(new rtt_handler())->set_next(new move_handler());
		ucache->init();
		ucache->setup_sync_timer();
		server srv(hnd, "::", "55555");
		srv.run();
	}
	catch (std::exception& e)
	{
		LOG_T_ERR(e.what());
	}
}